package com.rui.responsibility.model.base;

import com.rui.responsibility.model.Handler;
import com.rui.responsibility.obj.User;
import org.apache.commons.lang.StringUtils;

/**
 * @Description: 校验用户名或者密码是否为空
 * @Author: ZhangRui
 * @Date: 2023/3/3 14:49
 * @Version: 1.0
 */
public class BaseValidateHandler extends BaseHandler {

    @Override
    public void doHandler(User user) {
        if (StringUtils.isBlank(user.getUsername()) || StringUtils.isBlank(user.getPassword())) {
            System.out.println("用户名或者密码为空!");
            return;
        }
        System.out.println("校验通过");

        super.next.doHandler(user);
    }

}
